package com.reborn.mall.api.controller;

import com.reborn.mall.api.model.entity.NewProductRecommend;
import com.reborn.mall.api.model.entity.Product;
import com.reborn.mall.api.service.NewProductRecommendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO: Here is description
 *
 * @author wu.yue
 * @since 2020/2/18
 */
@RestController
@RequestMapping("/marketing/newProduct")
public class NewProductRecommendController extends BaseController<NewProductRecommend> {

    @Autowired
    private NewProductRecommendService service;

    @GetMapping("/list")
    public List<Product> findRecommendedProducts() {
        return service.findRecommendedProducts();
    }
}
